from pages.base_page import BasePage


class FlashSalePage(BasePage):
    flash_sale_report = '//*[@text="秒杀线报"]'
    page1_back_button = '//*[@resource-id="cool.dingstock.mobile:id/back_iv"]'
    
    def get_flash_sale_title(self):
        """秒杀线报元素文本"""
        return self.get_xpath_text(self.flash_sale_report)
    
    def back_recommend_page(self):
        """秒杀神器页面返回推荐主页"""
        self.click_xpath(self.page1_back_button)